![]() |
PATH![]() |
![]() ![]() |
Print is an application command that prints one or more objects.
tell application "Apple System Profiler"
print report "Control Panel Report"
end tell
The next script tells the Finder to print two AppleWorks documents. This is the equivalent of selecting the two documents in the Finder and choosing Print from the File menu.
tell application "Finder"
print {file "Hard Disk:Letters:Offer", ¬
file "Hard Disk:Letters:Acceptance"}
end tell
To specify the name of a file to print, use the term file or alias followed by a string of the form " Disk : Folder1 : Folder2 :...: Filename " ; for details, see References to Files. You can also specify a string with only a filename (" Filename "). In this case, the application attempts to find the file in the current directory. (The current directory is typically the directory where the application was launched, the directory where the application last opened or saved a previous document, or another directory specified by the application. The current directory may be affected by settings in the General Controls control panel.)